<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="${ctx}/static/jQuery-File-Upload-9.7.0/css/jquery.fileupload.css">
<link rel="stylesheet" href="${ctx}/static/jQuery-File-Upload-9.7.0/css/jquery.fileupload-ui.css">
<link rel="stylesheet" href="${ctx}/static/common/app_group.css">
<script src="${ctxStatic}/jquery/jquery-2.0.2.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/common/default.js?v=${fns:getJsVersion()}" type="text/javascript"></script>
<style>
p{
	margin:5px 0;
}

</style>
<script>
// 计算页面的实际高度，iframe自适应会用到
function calcPageHeight(doc) {
  var cHeight = Math.max(doc.body.clientHeight, doc.documentElement.clientHeight);
  var sHeight = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight);
  var height  = Math.max(cHeight, sHeight);
  return height
}
window.onload =  function () {
	   changeHeight();
	   
}
function changeHeight(){
	   var height = calcPageHeight(document);
	   var partId = $('#partId').val();
	   var size = $('#size').val();
	   var file = getQueryString('file');
	   if(size==0){
		  height = 25;
	   }
	   $(parent.document).find('#div-'+partId).find('iframe').attr('style','height:'+height+'px');
	   if(file==1){
		   parent.changeHeight(); //重新调用父页面中设置高度的方法  不然上传文件的时候高度不会动态变化
	   }
	   
}

</script>
</head>
<body style='overflow-y:hidden'>
<input type='hidden' name="" id="partId" value="${partId}"/>
<input type='hidden' name="" id="size" value="${size}"/>
<c:if test="${size==0}">
	<span>无附件资料</span>
</c:if>
<table style='width:100%'>
<c:forEach items="${attList}" var="att" varStatus="idxStatus">
	<tr class="template-download fade">
		<td>
            <p class="name">
            	<i class="i_group i_{att.fileIcon}_h17"></i>
                <a href="${ctx}/attachment/filedown.do?attId=${att.id}" target="_blank" title="${att.fileName}" >${att.name}</a>
            </p>
         </td>
         <td>
            <span class="size">${att.uploadPerson}</span>
        </td>
        <td>
            <span class="size">${att.createDate}</span>
        </td>
        <td>
            <span class="size">${att.size}</span>
        </td>
    </tr>
</c:forEach>
</table>
</body>
</html>